<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:nwisdocs="http://wales.nhs.uk/nwis/docs"
  exclude-result-prefixes="xs xsi">

<xsl:output version="4.0" method="html" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>

  <xsl:include href="../utils.xsl"/>
  <xsl:include href="../doclet-admission-details-v2.xsl"/>
  <xsl:include href="../doclet-discharge-details-v2.xsl"/>
  <xsl:include href="../doclet-medications-list-v1.xsl"/>
  <xsl:include href="../doclet-gp-details-v2.xsl"/>
  <xsl:include href="../doclet-patient-details-v1.xsl"/>
  <xsl:include href="../doclet-allergies-v1.xsl"/>
  <xsl:include href="../doclet-progressinhospital-v1.xsl"/>
  <xsl:include href="../doclet-diagnoses-v1.xsl"/>
  <xsl:include href="../doclet-investigations-v1.xsl"/>
  <xsl:include href="../doclet-presenting-complaints-v1.xsl"/>
  <xsl:include href="../doclet-patient-characteristics-v1.xsl"/>
  <xsl:include href="../doclet-actions-v1.xsl"/>
  <xsl:include href="../doclet-any-other-information-v1.xsl"/>
  <xsl:include href="../doclet-operations-and-procedures-details-v1.xsl"/>
  <xsl:include href="../doclet-clinical-finding-v1.xsl"/>
  <xsl:include href="../doclet-document-characteristics-v1.xsl"/>
  <xsl:include href="../doclet-treatments-v1.xsl"/>
  
  <xsl:template match="//nwisdocs:DAL">

    <div class="container_12">
      <div class="grid_6">
        <!--<xsl:call-template name="gp-details" />-->
        <xsl:apply-templates select="nwisdocs:DocumentHeader/nwisdocs:PatientDetails/nwisdocs:GPdetails" />
        <xsl:call-template name="document-characteristics" />
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:HospitalAdmission" />        
      </div>
      <div class="grid_6">
        <xsl:apply-templates select="nwisdocs:DocumentHeader/nwisdocs:PatientDetails" />
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:HospitalDischarge" />
      </div>
      <div class="grid_12">
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:Observations" />
      </div>
      <div class="grid_12">
        <xsl:call-template name="allergies" />
      </div>
      <div class="grid_12">
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:PresentingComplaints" />
      </div>
      <div class="grid_12">
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:ClinicalFindings" />
      </div>
      <div class="grid_12">
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:InvestigationsAndResults" />
      </div>
      <div class="grid_12">
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:DiagnosesAndProblems" />
      </div>
      <div class="grid_12">
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:Treatments" />
      </div>
      <div class="grid_12">
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:SignificantProcedures" />
      </div>
      <div class="grid_12">
        <xsl:call-template name="progress-in-hospital" />
      </div>
      <div class="grid_12">
        <xsl:call-template name="actions" />
      </div>
      <div class="grid_12">
        <xsl:call-template name="other-information" />
      </div>
      <div class="grid_12">
        <!--
        <xsl:call-template name="medications" />-->
        <xsl:apply-templates select="nwisdocs:DocumentBody/nwisdocs:Medications" />
      </div>
    </div>

  </xsl:template>


</xsl:stylesheet>
